﻿//
// ExceptionMessage.cs
//
// Authors:
//    Claus Jørgensen <10229@iha.dk>
//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Messaging;

namespace RSD.ViewModel.Messages
{
    /// <summary>
    /// Message for when a exception occours.
    /// </summary>
    public class ExceptionMessage : MessageBase
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="T:ExceptionMessage"/> class.
        /// </summary>
        /// <param name="exception">The exception.</param>
        public ExceptionMessage(Exception exception)
        {                   
            this.Exception = exception;            
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="T:ExceptionMessage"/> class.
        /// </summary>
        public ExceptionMessage(string message)
        {
            this.Exception = new Exception(message);            
        }

        /// <summary>
        /// Gets the exception.
        /// </summary>
        /// <value>The exception.</value>
        public Exception Exception
        {
            get;
            private set;
        }
    }
}
